Skip to main content

Media Foundation External

Type

library

Description

Commands and functions for using the Media Foundation API on Windows to transcode and edit video.

Associated Syntax

Command

NameSummarySyntax
mediaFoundationCreateReaderCreate a media file reader Platform:desktopmediaFoundationCreateReader <pFilePath>
mediaFoundationDeleteVideoProcessorDelete a video processor Platform:desktopmediaFoundationDeleteVideoProcessor <pVideoProcessorID>
mediaFoundationAddStreamToWriterAdd a stream to a writer Platform:desktopmediaFoundationAddStreamToWriter <pFilePath>, <pMediaTypeID>
mediaFoundationTranscodeTranscode part or all of the media from from a reader to a writer Platform:desktopmediaFoundationTranscode <pReaderFilePath>, <pWriterFilePath>, <pVideoProcessorID>, [<pOffset>], [<pFrom>], [<pDuration>]
mediaFoundationReaderStreamSetCurrentMediaTypeSet the current media type of a reader stream. Platform:desktopmediaFoundationReaderStreamSetCurrentMediaType <pFilePath>, <pStreamIndex>, <pMediaTypeID>
mediaFoundationCreateVideoProcessorCreate a video processor Platform:desktopmediaFoundationCreateVideoProcessor
mediaFoundationWriterStreamSetInputMediaTypeSet the input media type of a stream of a writer Platform:desktopmediaFoundationWriterStreamSetInputMediaType <pFilePath>, <pStreamIndex>, <pMediaTypeID>
mediaFoundationVideoProcessorSetInputMediaTypeSet the current input media type Platform:desktopmediaFoundationVideoProcessorSetInputMediaType <pVideoProcessorID>, <pMediaTypeID>
mediaFoundationVideoProcessorSetSourceRectSet the source rect of the video processor Platform:desktopmediaFoundationVideoProcessorSetSourceRect <pVideoProcessorID>, <pLeft>, <pTop>, <pRight>, <pBottom>
mediaFoundationVideoProcessorSetOutputMediaTypeSet the current output media type Platform:desktopmediaFoundationVideoProcessorSetOutputMediaType <pVideoProcessorID>, <pMediaTypeID>
mediaFoundationMediaTypeSetAttributeSet an attribute of a media type Platform:desktopmediaFoundationMediaTypeSetAttribute <pMediaTypeID>, <pAttribute>, <pValue>
mediaFoundationWriterBeginWritingBegin writing to a media file Platform:desktopmediaFoundationWriterBeginWriting <pFilePath>
mediaFoundationDeleteMediaTypeDelete a media tyoe Platform:desktopmediaFoundationDeleteMediaType <pMediaTypeID>
mediaFoundationWriterFinalizeWritingFinalize writing to a media file Platform:desktopmediaFoundationWriterFinalizeWriting <pFilePath>
mediaFoundationReaderSetStreamSelectionSet the stream selection Platform:desktopmediaFoundationReaderSetStreamSelection <pFilePath>, <pStreamIndex>, <pSelected>
mediaFoundationVideoProcessorSetDestinationRectSet the destination rect of the video processor Platform:windowsPlatform: desktopmediaFoundationVideoProcessorSetDestinationRect <pVideoProcessorID>, <pLeft>, <pTop>, <pRight>, <pBottom>
mediaFoundationCreateWriterCreate a media file writer. Platform:desktopmediaFoundationCreateWriter <pFilePath>
mediaFoundationCreateMediaTypeCreate a media type Platform:desktopmediaFoundationCreateMediaType
mediaFoundationDeleteWriterDelete a media file writer. Platform:desktopmediaFoundationDeleteWriter <pFilePath>
mediaFoundationDeleteReaderDelete a media file reader Platform:desktopmediaFoundationDeleteReader <pFilePath>

Function

NameSummarySyntax
mediaFoundationReaderNumberOfStreamsGet the number of streams in the media file Platform:desktopmediaFoundationReaderNumberOfStreams(<pFilePath>)
mediaFoundationMediaTypeGetAttributeGet an attribute of a media type Platform:desktopmediaFoundationMediaTypeGetAttribute(<pMediaTypeID>, <pAttribute>)
mediaFoundationReaderDurationGet the duration of the media file. Platform:desktopmediaFoundationReaderDuration(<pFilePath>)
mediaFoundationVideoProcessorGetInputAvailableMediaTypeGet an input media type that the video processor supports Platform:desktopmediaFoundationVideoProcessorGetInputAvailableMediaType(<pVideoProcessorID>, <pIndex>)
mediaFoundationReaderStreamGetCurrentMediaTypeGet the current media type of a reader stream. Platform:desktopmediaFoundationReaderStreamGetCurrentMediaType(<pFilePath>, <pStreamIndex>)
mediaFoundationReaderStreamIsSelectedQuery if the stream is selected Platform:desktopmediaFoundationReaderStreamIsSelected(<pFilePath>, <pStreamIndex>)
mediaFoundationReaderStreamGetNativeMediaTypeGet the ID of the native media type of a reader stream Platform:desktopmediaFoundationReaderStreamGetNativeMediaType(<pFilePath>, <pStreamIndex>)
mediaFoundationVideoProcessorGetOutputAvailableMediaTypeGet an output media type that the video processor supports Platform:desktopmediaFoundationVideoProcessorGetOutputAvailableMediaType(<pVideoProcessorID>, <pIndex>)
mediaFoundationVideoProcessorGetOutputMediaTypeGet the current output media type Platform:desktopmediaFoundationVideoProcessorGetOutputMediaType(<pVideoProcessorID>)
Thank you for your feedback!

Was this page helpful?